import { legacy_createStore, combineReducers } from "redux";
import searchReducer from "./reducers/search";
import itemReducer from "./reducers/item";
import totalDataReducer from "./reducers/totalData";
import { composeWithDevTools } from "redux-devtools-extension";

const rootReducer = combineReducers({
  seach: searchReducer,
  item: itemReducer,
  totaldata: totalDataReducer,
});
//如果没有异步action的话就可以直接放第二个参数中，如果有异步action则把参数放在composeWithDevTools(applyMiddleWare（thunk）)
export default legacy_createStore(rootReducer, composeWithDevTools());
